﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SLSYJ.Core.DataInterfaces;
using SLSYJ.Core;
using NHibernate;
using ProjectBase.Data.NHibernate;
using NHibernate.Criterion;

namespace SLSYJ.Data
{
    public class PlusDao : GenericDao<Plus>, IPlusDao
    {

        #region IPlusDao Members

        public List<Plus> LoadPlusBy(string plusName)
        {
            ICriteria criteria = Session.CreateCriteria(typeof(Plus))
                .Add(Expression.Eq("Name", plusName));

            return criteria.List<Plus>() as List<Plus>;
        }

        #endregion
    }
}
